<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml">


<head>
<title>CSM Interferometric Radio Telescope</title>
</head>


<body>
<img src="static/logo.jpg" style="width: 100px;" /><h2>CSM Interferometric Radio Telescope Data Retrieval Tool</h2>
{% if (message != '') %}
<h3 style="color:#FF0000">{{ message }}</h3>
{% endif %}

<p>
Enter dates in either YYYY-MM-DD HH:MM:SS or YYYYMMDDHHMMSS format. Leave Y Limits blank to autoscale or for CSV. All times in UTC.
</p>
<form method="get" id="date" action="{{ action_url }}">
<table>
    <tr><th><label for="startdate">Start Date</label></th><td><input size="23" type="text" id="startdate" name="startdate" maxlength="19" value="{{ tenDate.isoformat(' ') }}"/></td></tr>
    <tr><th><label for="enddate">End Date</label></th><td><input size="23" type="text" id="enddate" name="enddate" maxlength="19" value="{{ maxDate.isoformat(' ') }}"/></td></tr>
    <tr><th><label for="ylim">Y Limits</label></th><td><span><input size="23" type="text" id="ymin" name="ymin"/> to <input size="23" type="text" id="ymax" name="ymax"/></span></td></tr>
    <tr><th><label for="type">Download Type</label></th><td><span><input type="radio" id="type" value="plot" name="type"/> Generate Plot<input type="radio" id="type" value="csv" name="type"/> Download CSV</span></td></tr>
    <tr><th><label for="Submit"></label></th><td><button id="Submit" name="Submit">Submit</button></td></tr>
</table>
</form>

<p>
The database contains data from {{ minDate.isoformat(' ') }} to {{ maxDate.isoformat(' ') }}.


</p>
Notes:  
<ul>
<li> if you make a plot and it's empty (shows no data) this means the radio is down for some reason.</li>
<li>Plots of more than 15-20 minutes of data will take some time to produce on the server.</li>
<li>Spikes are typically produced either by lightening or by HVAC switching on.  In the latter case the spikes will be around 100 times larger in magnitude.  You an use the y-limits to clip these.</li>
</ul>

<!--
<div>
<img src="{{ plot10_url }}" style="max-width:50%; display: block; margin-left: auto; margin-right: auto;" />
<div style="text-align: center;">Data from the previous 10 minutes</div>
</div>
-->

</body>
</html>
